//
//  NvEditVideoViewController.h
//  NvSellerShow
//
//  Created by dx on 17/2/7.
//  Copyright © 2017年 Meicam. All rights reserved.
//  

#import "Utils.h"
#import "NvsStreamingContext.h"
#import "NvsVideoTrack.h"
#import "NvMakeFilmClipModel.h"
#import "SAVideoRangeSlider.h"

@protocol NvEditVideoViewControllerDelegate<NSObject>
@optional
-(void)didFinishSetCaption: (NSString*) caption;
-(void)didFinishSetSticker: (NSString*) stickerPackageId;
//with NS_TIME_BASE
-(void)didFinishSetVideoTrimIn:(NSNumber *)trimIn andTrimOut:(NSNumber *)trimOut sound:(NSNumber *)volumn;
//with second
-(void)didFinishSetImageDuration:(NSNumber *)imageDuration sound:(NSNumber *)volumn;
@end

@interface NvEditVideoViewController : UIViewController<UITextViewDelegate,NvsStreamingContextDelegate,UICollectionViewDataSource, UICollectionViewDelegate>
@property(nonatomic,weak)id<NvEditVideoViewControllerDelegate>delegate;
@property (nonatomic, assign) NvSSVideoCreateScale editMode;

@property (nonatomic, assign) NvSSVideoCreateScale createMode;
@property (nonatomic, copy) NSString * themeUuid;
@property (nonatomic, copy) NSString * stickerPackageId;

@property (weak, nonatomic) IBOutlet UIImageView *titleImageView;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet SAVideoRangeSlider *editSlider;

//播放相关
@property (weak, nonatomic) IBOutlet UIButton *playButton;
@property (strong, nonatomic) NvsStreamingContext *streamingContext;
@property (strong, nonatomic) NvsTimeline *timeline;
@property (weak, nonatomic) IBOutlet UILabel *durationLabel;
@property (weak, nonatomic) IBOutlet UILabel *curLabel;
@property (strong, nonatomic) IBOutlet NvsLiveWindow *liveWindow;
@property (strong, nonatomic) NvMakeFilmClipModel* clipModel;

//caption laction area layoutconstraint

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *captionInputHconstraint;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *captionControlHConstraint;



@property (strong, nonatomic) NSNumber *triminTimestamp;
@property (strong, nonatomic) NSNumber *trimoutTimestamp;
@property (strong, nonatomic) NSNumber* imageDuration;
@end
